﻿<?php
//	Checks if this file is called within the framework; otherwise terminates.
if (!defined("IS_FRAMEWORK") || !IS_FRAMEWORK)	header("Location: http://".$_SERVER["HTTP_HOST"]."/error/404");
?>
<div class="component">
	<h1><?php echo $controls["title"]; ?></h1>
<?php if (!empty($controls["image"])) { ?>
	<div id="imageFrame">
		<img src="<?php echo $controls["image"]; ?>" alt="<?php echo $controls["imageDescription"]; ?>" />
		<p id="imageDescription"><?php echo $controls["imageDescription"]; ?></p>
		<p id="imageCredit"><?php echo $controls["imageCredit"]; ?></p>
	</div>
<?php } ?>
	<div>
		<?php echo $controls["content"]; ?>

	</div>
<?php if (!empty($exception) && !in_array($_SERVER["HTTP_HOST"], explode("|", LIVE_SITES))) { ?>
	<!-- Error -->
	<ul class="error">
		<li><label>Message: </label><?php echo $exception->getMessage(); ?></li>
		<li><label>Line: </label><?php echo $exception->getLine(); ?></li>
		<li><label>File: </label><?php echo $exception->getFile(); ?></li>
		<li><label>URL: </label><?php echo BASE_URL.$this->request->uri; ?></li>
<?php if (method_exists($exception, "getQuery")) { ?>
		<li><label>Query: </label><?php echo $exception->getQuery(); ?></li>
<?php } ?>
		<li><label>Details: </label><?php echo "<pre>".print_r($exception->getTraceAsString(), true)."</pre>"; ?></li>
	</ul>
<?php } ?>
</div>
